/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Delta;

import Jama.Matrix;

/**
 *
 * @author Ahmet
 */
public class Layer {

    private Lamel lamel;
    private double angle; //hoek
    private double thickness; //dikte
    private double heightBottom;
    private double heightTop;
    private Matrix Tinv;
    private Matrix Qt;
    
    public Layer(Lamel lamel, double angle, double thickness)
    {
        this.lamel = lamel;
        this.angle = angle;
        this.thickness = thickness;
        setUp();
    }

    public Lamel getLamel() {
        return lamel;
    }

    public void setLamel(Lamel lamel) {
        this.lamel = lamel;
    }

    public Matrix getTinv() {
        return Tinv;
    }

    public void setTinv(Matrix Tinv) {
        this.Tinv = Tinv;
    }
    
    public Matrix getQt() {
        return Qt;
    }

    public void setQt(Matrix Qt) {
        this.Qt = Qt;
    }

    public double getAngle() {
        return angle;
    }

    public void setAngle(double angle) {
        this.angle = angle;
    }

    public double getThickness() {
        return thickness;
    }

    public void setThickness(double thickness) {
        this.thickness = thickness;
    }

    public double getHeightBottom() {
        return heightBottom;
    }

    public void setHeightBottom(double heightBottom) {
        this.heightBottom = heightBottom;
    }

    public double getHeightTop() {
        return heightTop;
    }

    public void setHeightTop(double heightTop) {
        this.heightTop = heightTop;
    }
    
    @Override
    public String toString() {
        return "Lamel {" + this.lamel +"}, angle: "+this.angle + ", thickness: "+this.thickness;
    }
    
    private void setUp()
    {
        this.Tinv = Reken.tmat(this.angle);
        this.Qt = Reken.Qt(Tinv, lamel.getQ1());
    }
}
